import request from '@/utils/request'

// 全部年级查询
export function getall() {
  return request({
    url: '/grade/allGrade',
    method: 'get'
  })
}

// 年级管理查询
export function getgradeQuery(data) {
  return request({
    url: `/grade/query?name=${data.name}`,
    method: 'get'
  })
}
// 年级插入
export function insertgradeQuery(data) {
  return request({
    url: '/grade/insert',
    method: 'post',
    data
  })
}

// 年级删除
export function deletegradeQuery(data) {
  return request({
    url: `/grade/delete/${data.gradeId}`,
    method: 'delete'
  })
}

// 年级批量删除
export function deletegradeQuerys(data) {
  return request({
    url: `/grade/deletes/?ids%5B%5D=${data.item}`,
    method: 'delete'
  })
}

// 年级更新
export function updategradeQuery(data) {
  return request({
    url: '/grade/update',
    method: 'put',
    data
  })
}
